<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.hs.pre.page.PageUtil" %>
<%@ page import="com.hs.utils.*" %>
<%@ page import="com.hs.pre.model.BardianBean" %>
<%@ page import="com.hs.pre.model.ProfileBean" %>
<%@ page import="com.hs.pre.module.bardian.Parameter" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
List list = new ArrayList(); 
PageUtil pageUtil = (PageUtil)request.getAttribute("pageUtil");
    list = pageUtil.getResultList();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
	<HEAD>
		<base href="<%=basePath%>">
		<TITLE>个性设置</TITLE>
		<META http-equiv=content-type content="text/html; charset=utf-8">
		 <LINK href="<%=basePath%>/app/css/default.css" type=text/css rel=stylesheet>
		<!--end custom header content for this example-->
		<META content="MSHTML 6.00.2900.3429" name=GENERATOR>
	</HEAD>
	<BODY class=" yui-skin-sam">
	<table cellSpacing=0 align=right cellPadding=0 border=0>
<tr>
<td>
<table   cellSpacing=0 align=right cellPadding=0 border=0 valign=top>
<tr>
<td><input name="button" type="button" class="buttom"  onclick="window.location='<%=path %>/app/bardian/bardian.jsp'" value="添加"></td>
</tr>
</table>
</td>
</tr>
	<tr heigth="5px"><td><br></td></tr>
	<tr>
	<td>
<DIV class=tab>
<form  id="form1" method="post" action="bardian.do" >
<TABLE  style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all; TEXT-ALIGN: justify" width=100% cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR class=top>
    <TD width=5%>序号</TD>
    <TD width=5%>显示条数</TD>
    <TD width=5%>是否使用</TD>
    <TD width=30%>显示列</TD>
    <TD width=5%>删除</TD>
    </TR>
	   <%
	  int size = list.size();
	  for(int i=0;i<size;i++){
	    ProfileBean profileBean =(ProfileBean)list.get(i);
	    if(profileBean==null )
	    return;
	   %>
	  <TR align=center bgColor=<%if(i%2 == 0){out.println("#fffbff");}else{out.println("#eef1f9");} %>>
	     <td><%=pageUtil.getIPage().getThisNum()+i %></td>
	     <td><%=profileBean.getViewNum() %></td>
	     <td><%
	     if(Parameter.ISUSEY == profileBean.getIsUse().intValue())
	      	out.print("<img alt='使用中!' border=0 src='app/images/check.png'>");
	      else out.print("<a href='bardian.do?bardian=update&profileId="+profileBean.getId()+"'><img alt='未使用!' border=0 src='app/images/nuse.png'></a>");
	      %></td>
	     <td>
	     <%
	     StringBuffer  fileName = new StringBuffer("");
	      Iterator iterator = profileBean.getFileMap().values().iterator();
	      while(iterator.hasNext())
	      {
	      	BardianBean bardianBean = (BardianBean)iterator.next();
	      	fileName.append("["+bardianBean.getFieldName()+"]");
	      }
	         out.print(fileName);
	      %>
	     </td>
	     <td><a href="bardian.do?bardian=del&profileId=<%=profileBean.getId() %>"><img border="0" src="app/images/cross.png"></a> </td>
	   </TR>
	    <%} %>
	  </TBODY>
	</TABLE>
	</form>
  </DIV>
  </td>
  </tr> 
  <tr>
  	<td><%=pageUtil.viewHTML() %></td>
  </tr> 
</table>
	</BODY>
</HTML>